package com.mm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author wdx
 * @since 2021-02-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("mm_user")
@ApiModel(value="MmUser对象", description="用户表")
public class MmUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账号")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "生日")
    @TableField("birthday")
    private Date birthday;

    @ApiModelProperty(value = "头像")
    @TableField("head_img")
    private String headImg;

    @ApiModelProperty(value = "微信openId")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty(value = "昵称")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "手机号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "性别")
    @TableField("gender")
    private String gender;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "头像地址")
    @TableField("avatar_name")
    private String avatarName;

    @ApiModelProperty(value = "头像真实路径")
    @TableField("avatar_path")
    private String avatarPath;

    @ApiModelProperty(value = "是否为admin账号")
    @TableField("is_admin")
    private Boolean isAdmin;

    @ApiModelProperty(value = "状态：1启用、0禁用")
    @TableField("enabled")
    private Boolean enabled;

    @TableField("login_type")
    private String loginType;

    @TableField("social_id")
    private String socialId;


    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String BIRTHDAY = "birthday";

    public static final String HEAD_IMG = "head_img";

    public static final String OPEN_ID = "open_id";

    public static final String NICK_NAME = "nick_name";

    public static final String PHONE = "phone";

    public static final String GENDER = "gender";

    public static final String EMAIL = "email";

    public static final String AVATAR_NAME = "avatar_name";

    public static final String AVATAR_PATH = "avatar_path";

    public static final String IS_ADMIN = "is_admin";

    public static final String ENABLED = "enabled";

    public static final String LOGIN_TYPE = "login_type";

}
